abstract class squareObject{
  float w, h, x, y;
  String id;

  squareObject(String id, float x, float y, float w, float h){
    this.id = id;
    this.w = w;
    this.h = h;
    this.x = x;
    this.y = y;
  }
 
  abstract void display();

  boolean beetween(float a, float b, float c){
    if (a <= b && b <= c) return true;
    return false;
  }

  boolean over(){
    if (beetween(x - w, mouseX, x + w)
    && beetween(y - h, mouseY, y + h)
    && g.rectMode == RADIUS){
      return true;
    } else if (beetween(x, mouseX, x + w)
    && beetween(y, mouseY, y + h)
    && g.rectMode == CORNER){
      return true;
    }
    return false;
  }
  
  boolean clicked(){
    if (mousePressed && over())
      return true;
    return false;
  }
  
  String getId(){return id;}

}
